package com.daikit.daikit4gxt.client.ui.popup;

/**
 * Callback for {@link DkYesNoForDeleteMessageBox}. This callback must be passed in the show method of the message box
 * 
 * @author tcaselli
 * @version $Revision$ Last modifier: $Author$ Last commit: $Date$
 * @param <BEANTYPE>
 *           the deleted bean type
 */
public class DkYesNoForDeleteMessageBoxCallback<BEANTYPE>
{

	/**
	 * Callback before the model is deleted (called after the user pressed OK)
	 * 
	 * @param modelToDelete
	 *           the model to be deleted
	 * 
	 * @return whether the model should be deleted
	 */
	public <SUBTYPE extends BEANTYPE> boolean onBeforeDelete(final SUBTYPE modelToDelete)
	{
		// Nothing done by default
		return true;
	}

	/**
	 * Callback after the model is deleted
	 */
	public void onAfterDelete()
	{
		// Nothing done by default
	}

}
